﻿<BSButton Color="Color.Primary" @onclick="@onToggle">Launch demo modal</BSButton>
<BSModal @ref="VerticallyCentered" IsCentered="true">
    <BSModalHeader OnClick="@onToggle">Modal title</BSModalHeader>
    <BSModalBody><p>Modal body text goes here.</p></BSModalBody>
    <BSModalFooter>
        <BSButton Color="Color.Secondary" @onclick="@onToggle">Close</BSButton>
        <BSButton Color="Color.Primary" @onclick="@onToggle">Save Changes</BSButton>
    </BSModalFooter>
</BSModal>

@code
{
    BSModal VerticallyCentered;

    void onToggle(MouseEventArgs e)
    {
        VerticallyCentered.Toggle();
    }
}